export default [
  {
    path: '/login',
    component: '../layouts/LoginLayout',
    routes: [
      {
        path: '/login',
        name: 'login',
        component: './login/index'
      },
      {
        component: '404',
      },
    ],
  },
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      { path: '/', redirect: '/home' },
      {
        id: 1,
        path: '/home',
        name: 'home',
        icon: 'home',
        component: './home/index',
        authority: '10101',
      },
      {
        id: 2,
        path: '/permission',
        name: 'permission',
        icon: 'team',
        authority: '10201',
        routes: [
          { id: 3, path: '/permission/user', name: 'user', component: './permission/user', authority: '10301', },
          { id: 4, path: '/permission/role', name: 'role', component: './permission/role', authority: '10401', },
        ],
      },
      {
        id: 9,
        path: '/log',
        name: 'log',
        icon: 'snippets',
        authority: '10901',
        routes: [
          { id: 10, path: '/log/login', name: 'login', component: './log/login', authority: '11001', },
          { id: 11, path: '/log/operation', name: 'operation', component: './log/operation', authority: '11101', },
        ],
      },
      {
        id: 5,
        path: '/documents',
        name: 'documents',
        icon: 'file-text',
        authority: '10501',
        routes: [
          {
            id: 6,
            path: 'https://zh-hans.reactjs.org/docs/getting-started.html',
            target: '_blank',
            name: "react",
            authority: '10601',
          },
          {
            id: 7,
            path: 'https://umijs.org/zh/guide',
            target: '_blank',
            name: "umi",
            authority: '10701',
          },
          {
            id: 8,
            path: 'https://ant.design/docs/react/introduce-cn',
            target: '_blank',
            name: "ant-design",
            authority: '10801',
          },
        ],
      },
      {
        name: 'exception',
        icon: 'warning',
        path: '/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './exception/500',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];